package com.jk.vehicle.mini.entity;

import com.jk.vehicle.core.entity.BaseEntity;
import javax.persistence.*;
import lombok.Data;

import java.util.Date;

@Table(name = "user_bicycle_corp")
@Data
public class UserBicycleCorp extends BaseEntity {
    /**
     * user_id
     */
    @Column(name = "user_id")
    private Long userId;

    /**
     * bicycle_id
     */
    @Column(name = "bicycle_id")
    private Long bicycleId;

    /**
     * corp_id
     */
    @Column(name = "corp_id")
    private Long corpId;

    public static final class UserBicycleCorpBuilder {
        private Long userId;
        private Long bicycleId;
        private Long corpId;

        private UserBicycleCorpBuilder() {
        }

        public static UserBicycleCorp.UserBicycleCorpBuilder anUserBicycleCorpLink() {
            return new UserBicycleCorp.UserBicycleCorpBuilder();
        }

        public UserBicycleCorp.UserBicycleCorpBuilder withUserId(Long userId) {
            this.userId = userId;
            return this;
        }

        public UserBicycleCorp.UserBicycleCorpBuilder withBicycleId(Long bicycleId) {
            this.bicycleId = bicycleId;
            return this;
        }

        public UserBicycleCorp.UserBicycleCorpBuilder withCorpId(Long corpId) {
            this.corpId = corpId;
            return this;
        }

        public UserBicycleCorp build() {
            UserBicycleCorp userBicycleCorp = new UserBicycleCorp();
            userBicycleCorp.setUserId(userId);
            userBicycleCorp.setBicycleId(bicycleId);
            userBicycleCorp.setCorpId(corpId);
            return userBicycleCorp;
        }
    }

}